import {
	defineStore
} from 'pinia'

export const useCounterStore = defineStore('counter', {
	state: () => {
		return {
			current: 0,
			equipDetails: {},
		}
	},
	actions: {
		// tabbar的索引值
		setCurrent(index) {
			this.current = index
		},
		// 热销装备进详情
		equipDetail(item) {
			this.equipDetails = item
		}
	},
})
export const useFunctionStore = defineStore('useFunctionStore', {
	state: () => ({
		count: 0
	}),
	actions: {
		navigateBack() {
			uni.navigateBack({
				delta: 1
			})
		}
	}
})